class Solution:
    # @param n, an integer
    # @return an integer
    def reverseBits(self, n):
        n2 = bin(n)[2:]
        if len(n2) <= 32:
            rev_n2 = n2[::-1]+'0'*(32-len(n2))
        return int(rev_n2, 2)


if __name__ == '__main__':
    s = Solution()
    n = 1
    print(s.reverseBits(n))
